<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			//1，手机号    
		var	reg= /^1[34578]\d{9}$/ ;
		console.log(reg.test("183594059505")); // 12 位false
			//  2、邮箱
			// /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
			 reg= /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
			console.log(reg.test("44130817@qq..com"));
			 // 3、身份证   
			reg = /^3506[0-9]{2}(19|20)[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|31)|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}([0-9]|x|X)$/;
			
			console.log(reg.test("350626199802282011")); 
		
		
		</script>
	</head>
	<body>
		<input type="text" id="zz"/> 
		<input type="submit" /> 
		
	</body>
</html>
